package com.hmkj.core.model.pay;

import lombok.Data;

/**
 * 支付结果
 *
 * @author Vector
 */
@Data
public class PayResult {
    /**
     * 操作结果
     */
    private boolean result;
    /**
     * 结果信息
     */
    private String message;
    /**
     * 按钮连接
     */
    private String btnUrl;

    public static Object failed(String message) {
        PayResult result = new PayResult();
        result.setResult(false);
        result.setMessage(message);
        return result;
    }

    public static Object success(String message) {
        PayResult result = new PayResult();
        result.setResult(true);
        result.setMessage(message);
        return result;
    }

    public static Object failed(String message,String btnUrl) {
        PayResult result = new PayResult();
        result.setResult(false);
        result.setMessage(message);
        result.setBtnUrl(btnUrl);
        return result;
    }

    public static Object success(String message,String btnUrl) {
        PayResult result = new PayResult();
        result.setResult(true);
        result.setMessage(message);
        result.setBtnUrl(btnUrl);
        return result;
    }
}
